package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the OVERVIEW database table.
 * 
 */
@Entity
@NamedQuery(name="Overview.findAll", query="SELECT o FROM Overview o")
public class Overview implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="OVERVIEW_OVERVIEWID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="OVERVIEW_OVERVIEWID_GENERATOR")
	@Column(name="OVERVIEW_ID")
	private long overviewId;

	@Column(name="AVERAGE_SCORE")
	private BigDecimal averageScore;

	@Column(name="GOOD_NUMBER")
	private BigDecimal goodNumber;

	@Column(name="NUMBER_EXAM")
	private BigDecimal numberExam;

	@Column(name="NUMBER_EXCELLENT")
	private BigDecimal numberExcellent;

	@Column(name="NUMBER_PASS")
	private BigDecimal numberPass;

	@Column(name="NUMBER_STUDENT")
	private BigDecimal numberStudent;

	@Column(name="OV_NUMBER")
	private BigDecimal ovNumber;

	private BigDecimal proiciency;

	//bi-directional many-to-one association to ExamArrange
	@OneToMany(mappedBy="overview")
	@JSONField(serialize=false)
	private List<ExamArrange> examArranges;

	public Overview() {
	}

	public long getOverviewId() {
		return this.overviewId;
	}

	public void setOverviewId(long overviewId) {
		this.overviewId = overviewId;
	}

	public BigDecimal getAverageScore() {
		return this.averageScore;
	}

	public void setAverageScore(BigDecimal averageScore) {
		this.averageScore = averageScore;
	}

	public BigDecimal getGoodNumber() {
		return this.goodNumber;
	}

	public void setGoodNumber(BigDecimal goodNumber) {
		this.goodNumber = goodNumber;
	}

	public BigDecimal getNumberExam() {
		return this.numberExam;
	}

	public void setNumberExam(BigDecimal numberExam) {
		this.numberExam = numberExam;
	}

	public BigDecimal getNumberExcellent() {
		return this.numberExcellent;
	}

	public void setNumberExcellent(BigDecimal numberExcellent) {
		this.numberExcellent = numberExcellent;
	}

	public BigDecimal getNumberPass() {
		return this.numberPass;
	}

	public void setNumberPass(BigDecimal numberPass) {
		this.numberPass = numberPass;
	}

	public BigDecimal getNumberStudent() {
		return this.numberStudent;
	}

	public void setNumberStudent(BigDecimal numberStudent) {
		this.numberStudent = numberStudent;
	}

	public BigDecimal getOvNumber() {
		return this.ovNumber;
	}

	public void setOvNumber(BigDecimal ovNumber) {
		this.ovNumber = ovNumber;
	}

	public BigDecimal getProiciency() {
		return this.proiciency;
	}

	public void setProiciency(BigDecimal proiciency) {
		this.proiciency = proiciency;
	}

	public List<ExamArrange> getExamArranges() {
		return this.examArranges;
	}

	public void setExamArranges(List<ExamArrange> examArranges) {
		this.examArranges = examArranges;
	}

	public ExamArrange addExamArrange(ExamArrange examArrange) {
		getExamArranges().add(examArrange);
		examArrange.setOverview(this);

		return examArrange;
	}

	public ExamArrange removeExamArrange(ExamArrange examArrange) {
		getExamArranges().remove(examArrange);
		examArrange.setOverview(null);

		return examArrange;
	}

}